package it.gma.torero.parsing.token;

import it.gma.torero.parsing.Tokenizer.MalformedException;

public abstract class UnaryOperator extends BynaryOperator {

	UnaryOperator(String sequence) {
		super(sequence);
	}

	@Override
	public void setLeftOperand(Token rightOperand) throws MalformedException {
		throw new UnsupportedOperationException();
	}

	@Override
	public Token getLeftOperand() {
		throw new UnsupportedOperationException();
	}

	@Override
	public Cardinality getCardinality() {
		return Cardinality.UNARY;
	}
	
	
	public  boolean hasOperands() {
		return getRightOperand() != null;
	}

}
